package com.repast.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.repast.common.Const;
import com.repast.common.ServerResponse;
import com.repast.dao.TasteMapper;
import com.repast.pojo.Taste;
import com.repast.service.ITasteService;

@Service
public class TasteServiceImpl implements ITasteService {

	@Autowired
	private TasteMapper tasteMapper;
	public ServerResponse selectTasteList(){
		Map<String, List<Taste>> map = new HashMap<String, List<Taste>>();
		
		List<Taste> kouweilist = tasteMapper.selectListByTasteType(Const.TasteType.TYPE_KOUWEI);
		List<Taste> jikoulist = tasteMapper.selectListByTasteType(Const.TasteType.TYPE_JIKOU);
		map.put("kouweilist", kouweilist);
		map.put("jikoulist", jikoulist);
		return ServerResponse.createBySuccess(map);
	}
}
